<?php
class ReplyForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl = new MHDEV_View_Helper_BaseUrl();
    	
        parent::__construct($options);
        
        $this->setName('reply');
        
        // hidden field
        $hidden = new Zend_Form_Element_Hidden('receiver_uid');
        $hidden->setRequired(true);
        
        // title
        $title = new Zend_Form_Element_Text('title');
        $title->setLabel(Zend_Registry::get('lang')->_('messages_form_title'));
        $title->setRequired(true);
        $title->addValidator('NotEmpty');
        $title->setErrorMessages(array(
            0 => Zend_Registry::get('lang')->_('messages_form_title_error')
        ));
        $title->setAttrib('size', 30);
        
        // text
        $text = new Zend_Form_Element_Textarea('text');
        $text->setLabel(Zend_Registry::get('lang')->_('messages_form_text'));
        $text->setAttribs(array('cols' => 50, 'rows' => 10));
        $text->setRequired(true);
        
        // submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel(Zend_Registry::get('lang')->_('form_send'));
        
        $this->addElements(array($title, $text, $hidden, $submit));
    }
}  